<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ page contentType="text/html; charset=UTF-8" %>
<%@ taglib uri="/struts-tags" prefix="s" %>
<%@ include file="/common/common.jsp"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/cases/source/";  //应用的地址名
String listActionName = basePath+"CaseSourceReceive_getCaseSourceDbJs.action";
String addActionName = basePath+"CaseSourceReceive_add.action";
String editActionName = basePath+"CaseSourceReceive_modify.action";
String delActionName = basePath+"CaseSourceReceive_del.action?op=deljs";
String lookActionName = basePath+"CaseSourceReceive.action?op=look";
String downActionName = basePath+"CaseSourceReceive_caseSourceDown.action";
String shActionName = basePath+"CaseSourceReceive_openShPage.action";
String submitActionName = basePath+"CaseSource_openSubmitPage.action";
String lookFrameActionName = basePath+"CaseSourceReceive_lookItemFrame.action?";

%>

<script type="text/javascript">
    		$(function(){    			
			$('#searchTable').grid({
     		   url:'<%=path%>/cases/source/CaseSourceReceive_getCaseSourceDbJs.action',
     		   pagination:false,   //不显示分页
     		   singleSelect:true,
     		  frozenColumns : [ [ {
  				field : 'ck',
  				checkbox : false
  			}] ],
  			//数据列，根据显示的内容进行修改
  			columns : [ [

  			 {
  				field : 'taxpayerNumber',
  				title : '纳税人识别号',				
  				sortable : true
  			},{
  				field : 'involvedEnterprice',
  				title : '涉案企业',
  				width : 200,
  				sortable : true
  			},{
  				field : 'caseFromName',
  				title : '案件来源',				
  				sortable : true
  			}, {
  				field : 'statusInfo',
  				title : '最新处理情况',				
  				sortable : true
  			}

  			] ],
  		    onClickRow:function(rowIndex, rowData){
  				viewItem(rowData.vcId);
  			}
     	   });
			
		
	});   		
    		
 		//打开查看页面
 		function viewItem(id){
 			var rows = $('#searchTable').datagrid('getSelections');	
 			var num=rows[0].taxpayerNumber;
 			parent.parent.addTabs_(num+'案源查看','<%=lookFrameActionName%>&chkSelf='+id);
 		}
	
     //上报
       function submitPage(){
    	   var vcId='';
    	   var rows = $('#searchTable').datagrid('getSelections');					
			if (rows.length>1){
			   $.messager.alert('消息提示','上报案源时请选择单条案源','error');
			}else if(rows.length==1){
				vcId = rows[0].vcId;
			}else{
			   $.messager.alert('消息提示','请选择要上报的案源','error');
			}
    	   defaultOpenWindow('<%=submitActionName%>','上报案源',550,350,{chkSelf:vcId},{},{but:[{id:'btnSubmit',name:'上报',classname:'icon-save'}]});
       }
     //审核
       function openShPage(){
    	   var vcId='';
    	   var rows = $('#searchTable').datagrid('getSelections');					
			if (rows.length>1){
			   $.messager.alert('消息提示','上报案源时请选择单条案源','error');
			}else if(rows.length==1){
				vcId = rows[0].vcId;
			}else{
			   $.messager.alert('消息提示','请选择要上报的案源','error');
			}
    	   defaultOpenWindow('<%=shActionName%>','上报案源',550,350,{chkSelf:vcId},{},{but:[{id:'btnSubmit',name:'同意',classname:'icon-save'},{id:'btnSubmit2',name:'驳回',classname:'icon-save'}]});
       }
       //下达
       
       function downRow(){
    	   var vcId='';
    	   var rows = $('#searchTable').datagrid('getSelections');					
			if (rows.length>1){
			   $.messager.alert('消息提示','下达案源时请选择单条案源','error');
			}else if(rows.length==1){
				vcId = rows[0].vcId;
			}else{
			   $.messager.alert('消息提示','请选择要下达的案源','error');
			}
    	   defaultOpenWindow('<%=downActionName%>','下发案源',550,350,{chkSelf:vcId},{},{but:[{id:'downBtn',name:'下发',classname:'icon-save'}]});
       }
      
    </script>
<html>
  <head>
    <title><%=com.ce.util.RegeditUtil.getRegeditStringValue("SYSTEM_SEG_NAME") %></title>
  </head> 

<body class="easyui-layout">
	<div data-options="region:'center',border:false" style="overflow: hidden;">
		<table id="searchTable"></table>
	</div>

	
</body>



</html>
   
   

